import wtforms

from validators import BaseForm, BasePageForm


class UserForm(BaseForm):
    """
    用户表单校验类
    """
    id = wtforms.IntegerField()
    userName = wtforms.StringField("用户名", [wtforms.validators.DataRequired(message="用户名不能为空")])
    realName = wtforms.StringField("姓名", [wtforms.validators.DataRequired(message="姓名不能为空")])
    nickName = wtforms.StringField("昵称")
    avatar = wtforms.StringField("用户头像")
    password = wtforms.StringField("用户密码")
    salt = wtforms.StringField("密码加盐")
    mobilePhone = wtforms.StringField("手机号", [wtforms.validators.DataRequired(message="手机号不能为空")])
    tel = wtforms.StringField("联系电话")
    email = wtforms.StringField("邮箱")
    adminType = wtforms.StringField("管理员类型<sys_admin_type>")
    sex = wtforms.StringField("性别<sys_sex>")
    isLocked = wtforms.StringField("是否锁定")
    deptId = wtforms.StringField("所属部门")
    postId = wtforms.StringField("所属岗位")
    remark = wtforms.StringField("备注")
    createUser = wtforms.StringField("创建用户")
    updateUser = wtforms.StringField("更新用户")


class UserPageForm(BasePageForm):
    """
    用户分页校验类
    """
    pass
